/*
 * @Author: [wcy]
 * @Date: 2021-12-06 13:26:11
 * @LastEditors: [wcy]
 * @LastEditTime: 2021-12-14 13:09:19
 * @Description: 
 */
// promise形式封装showModal
export const showModal=({content})=>{
    return new Promise((resolve,reject)=>{
        wx.showModal({
            title: '提示',
            content: content,
            success: (res) => {
                resolve(res)
            },
            fail:(err)=>{
                reject(err)
            }
        });
    })
}

// promise形式封装showToast
export const showToast=({title})=>{
    return new Promise((resolve,reject)=>{
        wx.showToast({
            title: title,
            icon:"none",
            success: (res) => {
                resolve(res)
            },
            fail:(err)=>{
                reject(err)
            }
        });
    })
}